    <?php  include VIEWPATH.'common/head.php';  ?>
    <link href="<?php echo FONT_PATH.'static/bootstrap';?>/css/plugins/chosen/chosen.css?v=1" rel="stylesheet">
    <style>
        ul.chosen-results li{text-align:left !important;}
    </style>
    <!-- 日期组件 -->
    <link href="<?php echo FONT_PATH.'static/bootstrap/';?>css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <script src="<?php echo FONT_PATH.'static/bootstrap/';?>js/bootstrap-datetimepicker.js"></script>
    <!-- 日期组件 -->
    <body class="gray-bg">
    <div class="add-btn" style="float:right;margin-bottom:5px;">
        <div class="modal fade" id="img_list" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
            <div class="modal-dialog" style="width: 90%;"><div class="modal-content"></div></div>
        </div>
    </div>
    <div class="add-btn" style="float:right;margin-bottom:5px;">
        <div class="modal fade" id="add_img" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
            <div class="modal-dialog" style="width: 60%;"><div class="modal-content"></div></div>
        </div>
    </div>
    <div class="clearfix"></div>

    <div class="wrapper wrapper-content ">
        <div class="add-btn" style="float:right;margin-bottom:5px;">
            <div class="modal fade" id="order_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                <div class="modal-dialog" style="width: 80%;"><div class="modal-content"></div></div>
            </div>
        </div>

        <div class="add-btn" style="float:right;margin-bottom:5px;">
            <div class="modal fade" id="order_audit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                <div class="modal-dialog" style="width: 50%;"><div class="modal-content"></div></div>
            </div>
        </div>
        <div id="topic_list_json" style="display: none"><?php echo $topic_list_json;?></div>
        <div id="tag_list_json" style="display: none"><?php echo $tag_list_json;?></div>
        <script>
            //检测是否在数组中
            function js_in_array(id,id_arr) {
                for(var i=0;i<id_arr.length;i++){
                    if(id === id_arr[i]){
                        // alert(id);
                        // alert(id_arr[i]);
                        return true;
                    }
                }
                return false;
            }
            //生成话题下拉菜单
            function top_list_echo(id,id_arr) {
                    var topic_arr = id_arr.split(',');
                    var topic_list_json = JSON.parse($('#topic_list_json').text());
                    var html = '<select name="topic_list[]" data-id="' + id + '" data-placeholder="选择话题" class="chosen-select topic_list"  multiple  tabindex="1">';
                    $.each(topic_list_json, function (n, data) {
                            var selected = (js_in_array(data['id'], topic_arr) ? 'selected' : '');
                            html += '<option ' + selected + '  hassubinfo="true"  value="' + data['id'] + '">' + data['title'] + '</option>';
                        }
                    );
                    html += '</select>';
                    $("#" + id + "").html(html);
                    for (var selector in config) $(selector).chosen(config[selector]);
                    $('.chosen-container').css('width', "100%");
            }
            //生成标签下拉菜单
            function tag_list_echo(id,id_arr,num) {
                    $("#" + id + "").html('');

                    id_arr=$("#" + id + "").attr('data-ids');
                    var tag_arr = id_arr.split(',');
                    var tag_list_json = JSON.parse($('#tag_list_json').text());
                    var html = '<select name="tag_list[]" data-id="' + id + '"  data-placeholder="选择标签" class="chosen-select tag_list"  multiple  tabindex="1">';
                    $.each(tag_list_json, function (n, data) {
                            var selected = (js_in_array(data['id'], tag_arr) ? 'selected' : '');
                            html += '<option ' + selected + '  hassubinfo="true"  value="' + data['id'] + '">' + data['title'] + '</option>';
                        }
                    );
                    html += '</select>';
                    $("#" + id + "").html(html);
                    for (var selector in config) $(selector).chosen(config[selector]);
                    $('.chosen-container').css('width', "100%");
            }


            function add_scrolltop(id,rows) {
                // alert(1);
                $("#"+id+"").scrollTop(10);//控制滚动条下移10px
                if( $("#"+id+"").scrollTop()>0 ){
                    var new_rows=rows+1;
                    $("#"+id+"").attr('rows',new_rows);
                    // add_scrolltop(id,new_rows);
                }
                $("#"+id+"").scrollTop(0);//滚动条返回顶部

            }
        </script>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><?php echo $pageTitle;?></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">

                        <div class="sousuo shouqi_s" style="margin-top: 15px;height: 88px;margin-bottom: 15px;">
                            <form class="form-horizontal" id="f_form" action="index.php?c=<?php echo $_REQUEST['c'];?>&m=<?php echo $_REQUEST['m'];?>" name="form" method="post">
                                <div class="form-group">


<!--                                    查询类型-->
                                    <div class="col-sm-3">
                                        <select name="s_type_id" class="form-control">
                                            <option <?php echo $s_type_id==1?"selected":""?> value="1">帖子id</option>
                                            <option <?php echo $s_type_id==2?"selected":""?> value="2">用户id</option>
                                            <option <?php echo $s_type_id==3?"selected":""?> value="3">帖子标题</option>
                                            <option <?php echo $s_type_id==4?"selected":""?> value="4">用户昵称</option>
                                        </select>
                                    </div>
<!--                                    查询内容-->
                                    <div class="col-sm-3">
                                        <input type="text" name="s_content" placeholder="请输入" class="input-sm form-control"  value="<?php echo $s_content;?>" autocomplete="off"/>

                                    </div>
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        是否有图：
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="is_pic" class="form-control">
                                            <option <?php echo $is_pic===''?"selected":""?> value="">全部</option>
                                            <option <?php echo $is_pic==='1'?"selected":""?> value="1">有图</option>
                                            <option <?php echo $is_pic==2?"selected":""?> value="2">无图片</option>

                                        </select>
                                    </div>
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        是否精华：
                                    </div>
                                    <div class="col-sm-1">
                                        <select name="is_hot" class="form-control">
                                            <option <?php echo $is_hot===''?"selected":""?> value="">全部</option>
                                            <option <?php echo $is_hot==='1'?"selected":""?> value="1">精华</option>
                                            <option <?php echo $is_hot==2?"selected":""?> value="2">普通</option>

                                        </select>
                                    </div>
                                    <div class="col-sm-1">
                                        <button class="btn btn-sm btn-primary" type="submit"> 搜索 </button>
                                    </div>
                                    <div class="col-sm-12" style="text-align: right;line-height: 30px;height:10px;padding: 0px;"></div>

<!--                                    审核状态-->
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">帖子类型：</div>
                                    <div class="col-sm-2">
<!--                                        全部/茉莉导入/麻花导入/用户上传/运营上传/签约用户上传-->

                                        <select name="post_type" class="form-control">
                                            <option <?php echo $post_type==''?"selected":""?> value="">全部</option>
                                            <option <?php echo $post_type == 3?"selected":""?> value="3">用户上传</option>
                                            <?php
                                            foreach ($source_res as $source){
                                                ?>
                                               <option <?php echo $post_type == $source['source']?"selected":""?> value="<?php echo $source['source'];?>"><?php echo $source['source'];?></option>

                                                <?php
                                            }
                                            ?>

                                        </select>
                                    </div>

                                    <!--                                    发布状态-->
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">发布状态：</div>
                                    <div class="col-sm-2">
                                        <select name="status" class="form-control">
                                            <option <?php echo $status==''?"selected":""?> value="">全部</option>
                                            <option <?php echo $status==1?"selected":""?> value="1">成功</option>
                                            <option <?php echo $status==2?"selected":""?> value="2">未通过</option>
                                            <option <?php echo $status==3?"selected":""?> value="3">删除</option>
                                        </select>
                                    </div>


                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">发布时间：</div>
                                    <div class="col-sm-2">
                                        <div class='input-group date' id='add_time1'>
                                            <input type='text' name="add_time_s" id="add_time_s" class="form-control" value="<?php echo $_REQUEST["add_time_s"];?>"/>
                                            <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class='input-group date' id='add_time2'>
                                            <input type='text' name="add_time_e" id="add_time_e" class="form-control" value="<?php echo $_REQUEST["add_time_e"];?>"/>
                                            <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                        </div>
                                    </div>

                                    <div class="col-sm-1">
                                        <div class="gengduo" style="width: 80%;height: 25px;line-height: 21px;background: #c1d1d7;border:1px solid #000000;padding: 2px 2px; text-align: center;cursor: pointer;">展开更多</div>
                                    </div>
                                    <div class="col-sm-12" style="text-align: right;line-height: 30px;height:10px;padding: 0px;"></div>

                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        选择操作人：
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="uid" class="form-control">
                                            <option value="">全部操作人</option>
                                            <?php
                                            foreach($admin_list as $k => $d){ ?>
                                                <option value="<?php echo $d['uid'];?>"  <?php echo $d['uid'] == $uid ? 'selected' : '';?>><?php echo $d['nickname'];?></option>
                                            <?php } ?>
                                        </select>
                                    </div>

                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">审核状态：</div>
                                    <div class="col-sm-2">
                                        <select name="is_audit" class="form-control">
                                            <!--                                            0:待审核 1:已审核 2:审核中-->
                                            <option <?php echo $is_audit==''?"selected":""?> value="">全部</option>
                                            <option <?php echo $is_audit==1?"selected":""?> value="1">待审核</option>
                                            <option <?php echo $is_audit==2?"selected":""?> value="2">已审核</option>
                                            <option <?php echo $is_audit==3?"selected":""?> value="3">审核中</option>
                                        </select>
                                    </div>


                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">操作时间：</div>
                                    <div class="col-sm-2">
                                        <div class='input-group date' id='use_time1'>
                                            <input type='text' name="use_time_s" id="use_time_s" class="form-control" value="<?php echo $_REQUEST["use_time_s"];?>"/>
                                            <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class='input-group date' id='use_time2'>
                                            <input type='text' name="use_time_e" id="use_time_e" class="form-control" value="<?php echo $_REQUEST["use_time_e"];?>"/>
                                            <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                        </div>
                                    </div>

                                    <div class="col-sm-12" style="text-align: right;line-height: 30px;height:10px;padding: 0px;"></div>

                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        话题分类：
                                    </div>

                                    <div class="col-sm-2">
                                        <select name="s_topic" id="s_topic" class="form-control">
                                            <option value="">全部分类</option>
                                            <?php
                                            foreach($topic_list_one as $k => $d){ ?>
                                                <option value="<?php echo $d['id'];?>"  <?php echo $d['id'] == $s_topic ? 'selected' : '';?>><?php echo $d['title'];?></option>
                                            <?php } ?>
                                        </select>

                                    </div>
                                    <div class="col-sm-3">
                                        <div class="input-group suggests" style="margin-left:0px;width: 100%;">
                                            <input type="text" placeholder="请输入话题" class="input-sm form-control" id="s_topic_name" value="<?php echo isset($topic_arr['title'])?$topic_arr['title']:'';?>" onkeyup="getTopicList()" autocomplete="off"/>
                                            <input type="hidden" id="s_topic_id" name="s_topic_id" value="<?php echo isset($topic_arr['id'])?$topic_arr['id']:'';?>">
                                            <ul class="dropdown-menu dropdown-menu-right" id="topic_menu"></ul>
                                        </div>
                                    </div>
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        选择标签：
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="input-group suggests" style="margin-left:0px;width: 100%;">
                                            <input type="text" placeholder="请输入标签" class="input-sm form-control" id="s_tag_name" value="<?php echo isset($tag_arr['title'])?$tag_arr['title']:'';?>" onkeyup="getTagList()" autocomplete="off"/>
                                            <input type="hidden" name="s_tag_id" id="s_tag_id" value="<?php echo isset($tag_arr['id'])?$tag_arr['id']:'';?>">
                                            <ul class="dropdown-menu dropdown-menu-right" id="tag_menu"></ul>
                                        </div>
                                    </div>

                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        是否筛选节日：
                                    </div>
                                    <div class="col-sm-1">
                                        <select name="festival" class="form-control">
                                            <!--                                            0:待审核 1:已审核 2:审核中-->
                                            <option <?php echo $festival==''?"selected":""?> value="">全部</option>
                                            <option <?php echo $festival==1?"selected":""?> value="1">带节日</option>
                                        </select>
                                    </div>
                                    <div class="col-sm-12" style="text-align: right;line-height: 30px;height:10px;padding: 0px;"></div>

                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        封面图：<div style="height: 28px; width: 28px;background: #ffc6c6;color: red; float: right;text-align: center;line-height: 28px;border-radius:50px;border: 1px solid red;" title="输入规则：&#10;区间值方式&#10; 1、（0-199）取0-198之间的数据，&#10;2、（199-0）取大于199的数据；&#10;最小值方式&#10;1、（950）取大于950的数据">?</div>
                                    </div>

                                    <div class="col-sm-2">
                                        <input type="text" name="img_w" placeholder="图片宽度(0-10)px" class="input-sm form-control"  value="<?php echo $img_w;?>" autocomplete="off"/>
                                    </div>
                                    <div class="col-sm-2">
                                        <input type="text" name="img_h" placeholder="图片高度(100-0)px" class="input-sm form-control"  value="<?php echo $img_h;?>" autocomplete="off"/>
                                    </div>
                                    <div class="col-sm-2">
                                        <input type="text" name="img_size" placeholder="图片大小kb(0-10)kb" class="input-sm form-control"  value="<?php echo $img_size;?>" autocomplete="off"/>
                                    </div>
                                    <div class="col-sm-1">
                                        排序方式
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="res_order" class="form-control">
                                            <option value="2" <?php if($res_order == 2){ echo "selected";}?>>最多回帖量</option>
                                            <option value="3" <?php if($res_order == 3){ echo "selected";}?>>最多点赞量</option>
                                            <option value="4" <?php if($res_order == 4){ echo "selected";}?>>最多观看量</option>
                                            <option value="5" <?php if($res_order == 5){ echo "selected";}?>>最新发帖时间</option>
                                            <option value="6" <?php if($res_order == 6){ echo "selected";}?>>最早发帖时间</option>
                                            <option value="7" <?php if($res_order == 7){ echo "selected";}?>>最大爆光量</option>
                                            <option value="8" <?php if($res_order == 8){ echo "selected";}?>>最近更新时间</option>
                                            <option value="9" <?php if($res_order == 9){ echo "selected";}?>>最早更新时间</option>
                                        </select>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div>
                            <!-- Tab panes -->
                            <style>
                                <!--
                                .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th{vertical-align:top;}
                                -->
                            </style>
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="sellTab1">
                                    <style type="text/css">
                                        .tg  {border-collapse:collapse;border-spacing:0;}
                                        .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;word-break:normal;border-color:black;}
                                        .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;word-break:normal;border-color:black;}
                                        .tg .tg-us36{vertical-align:middle}
                                    </style>

                                        <?php
                                        if(!empty($list)){
                                            $sex = array(0 => "默认", 1 => "男", 2=>"女");
                                            $is=0;
                                            foreach($list as $data){
                                        ?>
                                            <table class="tg table table-bordered">
                                                <tr style="background: #c8c8c8;">
                                                    <th class="tg-us36" colspan="2" width="10%">
                                                        id:<?php echo $data['id']?>
                                                        <input type="hidden" value="<?php echo $data['id'];?>" class="post_id">
                                                    </th>
                                                    <th class="tg-us36" colspan="2">
                                                        <textarea  rows="1" class="form-control update_title" id="desc_<?php echo $data['id']?>" data-id="<?php echo $data['id']?>" data-title="<?php echo $data['title']?>"><?php echo $data['title']?></textarea>
                                                        <script>
                                                            add_scrolltop('desc_<?php echo $data['id']?>',1);
                                                        </script>


<!--                                                        <a href="index.php?c=comment&m=index&post_id=--><?php //echo $data['id']?><!--" target="_blank">标题:--><?php //echo $data['title']?><!--</a>-->
                                                    </th>
                                                    <th class="tg-us36">
                                                        封面图片
                                                    </th>
                                                    <th class="tg-us36">
                                                        审核
                                                    </th>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36" width="8%">
                                                        <a class="J_menuItem" data-names="用户详情"  href="index.php?c=user&m=user_info&&uid=<?php echo $data['uid'];?>&op=user_info" target="_blank">
                                                            <img id="u_avator_<?php echo $data['uid']?>" src="<?php echo $data['author']['path']?>" onerror='this.src="<?php echo FONT_UPLOAD_PATH.'/static/images.jpg'?>"' width="50">
                                                        </a>
                                                    </td>
                                                    <td class="tg-us36"  width="10%">
                                                        <a class="J_menuItem" data-names="用户详情"  href="index.php?c=user&m=user_info&&uid=<?php echo $data['uid'];?>&op=user_info" id="u_nickname_<?php echo $data['uid'];?>" target="_blank">
                                                            <?php echo $data['author']['nickname'];?>
                                                        </a>
                                                        <p>
                                                            <span id="u_sex_<?php echo $data['uid'];?>"><?php echo "性别：".$sex[$data['author']['sex']];?></span>
                                                            <a href="index.php?c=user&m=user_edit&uid=<?php echo $data['author']['uid'];?>" data-toggle="modal" data-target="#img_list">编辑</a>
                                                        </p>
                                                    </td>
                                                    <td class="tg-us36" rowspan="3" width="50%">
                                                        <div style="height: 100%;width: 100%;overflow: auto;height: 140px;word-wrap:break-word;word-break:break-all;">
                                                            翻译：<?php echo $data['desc'];?>
                                                        </div>
                                                    </td>
                                                    <td class="tg-us36" rowspan="2" width="8%">
                                                        <div style="height: 100%;width: 100%;">
                                                            评论数：<a class="J_menuItem" data-names="评论管理"  href="index.php?c=comment&m=index&&post_id=<?php echo $data['id']?>" ><?php echo $data['comment_num']?></a><br>
                                                        点赞数：<?php echo $data['like_num']?><br>
                                                        分享数：<?php echo $data['share_num']?><br>
                                                        pv数：<?php echo $data['pv_num']?><br>
                                                        爆光量：<?php echo $data['show_num']?><br>
                                                        </div>
                                                    </td>
                                                    <td class="tg-us36" rowspan="5" width="6%">
                                                        <?php
                                                        $is_img=$data['post_img']['path']?$data['post_img']['path']."?x-oss-process=style/scale-cade2":"";?>
                                                        <button type="button" class="close_s" id="close_<?php echo $data['id']?>" aria-label="Close" style="opacity:0.99;background: #ffffff;color: red;<?php echo !empty($is_img)?'display:block;':'display:none;';?> border: 0px; float:right;" data-imgid="" onclick="del_img(<?php echo $data['id']?>)"><span aria-hidden="true">&times;</span></button>
                                                        <a class="btn " title="<?php echo '宽：'.$data['post_img']['w'].'px,高：'.$data['post_img']['h'].'px,大小：'.intval(intval($data['post_img']['size'])/1024).'kb';?>" href="index.php?c=imgList&m=img_list&id=<?php echo $data['id'];?>" data-toggle="modal" data-target="#img_list" style="background: #ffffff; margin: 0px;">

                                                            <img id="img_<?php echo $data['id'];?>" src="<?php echo $data['post_img']['path']?$data['post_img']['path']."?x-oss-process=style/scale-cade2":""?>" width="100" border="0" onerror='this.src="<?php echo FONT_UPLOAD_PATH.'/static/images.jpg'?>"'  >
                                                        </a>

                                                        <a class="btn btn-danger" href="index.php?c=imgLib&m=add_img&id=<?php echo $data['id'];?>" data-toggle="modal" data-target="#add_img">
                                                            添加
                                                        </a>
                                                    <td class="tg-us36" rowspan="5" width="6%">


                                                    <div  id="is_show_<?php echo $data['id']?>" style="<?php if($data['status'] == 3){ echo ' display:block;';}else{ echo ' display:none;';}?>">
                                                        <a href="index.php?c=post&m=post_check&id=<?php echo $data['id'];?>&type=3" data-toggle="modal" data-target="#img_list" style="line-height: 30px;text-align: center;">恢复</a><br>
                                                    </div>
                                                    <div id="is_check_<?php echo $data['id']?>" style="<?php if($data['status'] != 3){ echo ' display:block;';}else{ echo ' display:none;';}?>">

                                                    <input type="submit" class="submit_up" value="审核通过"><br>
                                                        <a href="index.php?c=post&m=post_check&id=<?php echo $data['id'];?>&type=1" data-toggle="modal" data-target="#img_list" style="line-height: 30px;text-align: center">审核不通过</a><br>
                                                        <a href="index.php?c=post&m=post_check&id=<?php echo $data['id'];?>&type=2" data-toggle="modal" data-target="#img_list" style="line-height: 30px;text-align: center">删除</a>


                                                    </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36">注册日期</td>
                                                    <td class="tg-us36" id="u_regdate_<?php echo $data['uid'];?>"><?php echo date("Y-m-d H:i:s",$data['author']['regdate']);?></td>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36">类型</td>
                                                    <td class="tg-us36">
                                                        <?php
                                                        if($data['author']['user_type']==1){echo "注册";}
                                                        if($data['author']['user_type']==2){echo "机器人";}
                                                        if($data['author']['user_type']==3){echo $data['author']['user_source']?$data['author']['user_source'].'导入':"未知导入";}
                                                        ?>
                                                    </td>
                                                    <td class="tg-us36"rowspan="1">
                                                    <a class="J_menuItem" data-names="操作记录" href="index.php?c=user&m=admin_log&&post_id=<?php echo $data['id'];?>&s_type=1">管理操作记录</a>
                                                    </td>

                                                </tr>
                                                <tr>
                                                    <td class="tg-us36" colspan="2" rowspan="2">
                                                        主帖：<a  class="J_menuItem" data-names="用户详情"  href="index.php?c=user&m=user_info&&uid=<?php echo $data['uid'];?>&op=post" target="_blank"><?php echo $data['author']['pub_num'];?></a>
                                                        评论：<a class="J_menuItem" data-names="用户详情"  href="index.php?c=user&m=user_info&&uid=<?php echo $data['uid'];?>&op=reply" target="_blank"><?php echo $data['author']['reply_num'];?></a><br>
                                                        积分/金币：<?php echo $data['author']['gold_num'];?>
                                                        经验：<?php echo $data['author']['experience'];?>
                                                        信誉：<?php echo $data['author']['reputation'];?>
                                                    </td>
                                                    <td class="tg-us36" colspan="2">
                                                        <div style="float: left;">
                                                            发布时间：<?php echo date('Y-m-d H:i:s',$data['add_time'])?>
                                                        </div>
                                                        <div style="float: right;">
                                                            <?php echo $data['user']['nickname']?'操作人：'.$data['user']['nickname']:""?>
                                                            <?php echo $data['user']['openation_time']?'操作时间:'.date("Y-m-d H:i:s",$data['user']['openation_time']):""?>
                                                            <span class="status_<?php echo $data['id']?>" title="<?php echo $data['user']['desc']?>" style="color: #0d8ddb;">
                                                                <?php
                                                                echo $data['is_audit']==1?"已审核":($data['is_audit'] == 2?"审核中":"待审核");
                                                                echo "(".($data['status']==1?"成功":($data['status'] == 2?"未通过":"已删除")).")";
                                                                ?>
                                                            </span>
                                                        </div>

                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36" colspan="2">
                                                        <?php echo $this->PostTopicModel->get_topic($data['title'].','.$data['desc'],$new_topic,$new_tag);?>

                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36">标签</td>
                                                    <td colspan="3" width="72%" class="tg-us36 tag_list_js"
                                                        data-ids="<?php echo !empty($data['tag_data']['ids']) ? implode(',', $data['tag_data']['ids']) : ''?>"
                                                        data-id="<?php echo $data['id']?>"
                                                        id="tag_list_echo_<?php echo $data['id']?>" >
                                                    </td>
                                                    <td colspan="2" class="tg-us36" >
                                                        加精：<label><input type="radio" name="is_hot_<?php echo $data['id'];?>" class="is_hot" value="0" <?php echo $data['is_hot'] == 0 ?'checked="checked"':''?>>普通</label>
                                                        <label style="margin-left: 10px;"><input type="radio" name="is_hot_<?php echo $data['id'];?>" class="is_hot" value="1"  <?php echo $data['is_hot'] == 1 ?'checked="checked"':''?>>加精</label>
                                                    </td>

                                                </tr>
                                                <tr>
                                                    <td width="8%" class="tg-us36" >话题</td>
                                                    <td colspan="3" class="tg-us36 topic_list_js"
                                                        data-ids="<?php echo !empty($data['topic_data']['ids']) ? implode(',', $data['topic_data']['ids']) : ''?>"
                                                        width="72%"  id="top_list_echo_<?php echo $data['id']?>" >
                                                    </td>
                                                    <td colspan="2" class="tg-us36"  width="20%">
                                                        分类:<span class="class_text"><?php echo $data['topic_data']['class']?></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tg-us36" colspan="6">
                                                        <audio controls="controls"  preload="load" style="width:100%">
                                                            <source src="<?php echo $data['audio_address']?>" type="audio/mpeg">
                                                            <embed src="<?php echo $data['audio_address']?>" width="500px" height="100px" autostart="false" loop="false">
                                                        </audio>
                                                    </td>
                                                </tr>
                                            </table>
                                        <?php }}?>

                                    <div class="set_page">
                                        <?php
                                            if($status_s!==0){
                                                echo $multipage;
                                            }
                                        ?>
                                        <div class="clearfix"></div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="<?php echo FONT_PATH.'static/bootstrap';?>/js/plugins/chosen/chosen.jquery.js?v=1"></script>
    <script src="<?php echo FONT_PATH.'static/bootstrap';?>/js/demo/form-advanced-demo.min.js"></script>
    <script type="text/javascript">
        function del_img(post_id) {
            $.ajax({
                type:'post',
                url:"index.php?c=imgLib&m=del_img",
                data:{'post_id':post_id},
                dataType:'json',
                success:function(result){
                    if(result['status'] == 1){
                        alert("图片删除成功");
                        $('#img_'+post_id+'').attr('src','');
                        $('#close_'+post_id+'').hide();
                    }else{
                        alert("删除图片失败")
                    }
                }
            });
        }
        $(function () {
            //提交审核通过
            $(".submit_up").click(function () {
                var topic_list=$(this).parent().parent().parent().parent().find('.topic_list').val();
                var tag_list=$(this).parent().parent().parent().parent().find('.tag_list').val();
                var is_hot=$(this).parent().parent().parent().parent().find('input[class="is_hot"]:checked').val();
                var post_id=$(this).parent().parent().parent().parent().find('.post_id').val();
                var status=$(this).parent().parent().parent().parent().find('.status');
                var class_text=$(this).parent().parent().parent().parent().find('.class_text');
                $.ajax({
                    type:'post',
                    url:"index.php?c=post&m=update_post",
                    data:{'topic':topic_list,'tag':tag_list,'is_hot':is_hot,'id':post_id},
                    dataType:'json',
                    success:function(result){
                        if(result['status'] == 2){
                            alert(result['msg'])
                        }else{
                            alert("更新成功");
                            // tag
                            $('#tag_list_echo_'+post_id+'').attr('data-ids',result['tag_ids']);
                            // topic
                            $('#top_list_echo_'+post_id+'').attr('data-ids',result['top_ids']);
                            class_text.text(result['class_title']);
                            $('.status_'+post_id+'').text(result['msg']);
                            $('.status_'+post_id+'').css({'color':'red'});
                        }
                    }
                });
            })
            $(document).on("click",".no-results",function() {
                var select_name=$(this).attr('data-name');
                var select_id=$(this).attr('data-id');
                var title=$(this).attr('data-tag');
                $.ajax({
                    type:'post',
                    url:"index.php?c=post&m=add_tag",
                    data:{'title':title,'select_name':select_name},
                    dataType:'json',
                    async:false,
                    success:function(result){
                        if(result['status'] == 2){
                            alert(result['msg'])
                        }else{
                            if(result['type']== 'top'){
                                var ids=$('#'+select_id+'').attr('data-ids');
                                $('#topic_list_json').text(result['json_arr']);
                                $('#'+select_id+'').attr('data-ids',ids+","+result['id']);
                                alert('话题添加成功')
                            }else{
                                var ids=$('#'+select_id+'').attr('data-ids');
                                $('#tag_list_json').text(result['json_arr']);
                                $('#'+select_id+'').attr('data-ids',ids+","+result['id']);
                                alert('标签添加成功')
                            }
                        }
                    }
                });
                if(select_name == 'tag_list[]'){
                        for_tag();
                }else{
                        for_topic();
                }

            });
        });



    </script>
    <script type="text/javascript">
        $(function () {
            function getDate(num) {
                var t =  24*3600*1000;
                var n = new Date()*1;
                return new Date(n +  num*t).toLocaleDateString().replace(/\//g,'-');
            }
            function setDateRange(type) {
                var $start=$('#use_time1 input');
                var $end=$('#use_time2 input');
                switch(type){
                    case 'dm':
                        $start.val(getDate(-1*(new Date().getDate())+1));
                        $end.val(getDate(0));
                        break;
                    case 'd1':
                        $start.val(getDate(-1));
                        $end.val(getDate(-1));
                        break;
                    case 'd7':
                        $start.val(getDate(-7));
                        $end.val(getDate(0));
                        break;
                    case 'd30':
                        $start.val(getDate(-30));
                        $end.val(getDate(0));
                        break;
                }
            }
            $('#use_time1,#use_time2,#add_time1,#add_time2').datetimepicker({
                language: 'zh-CN',
                minView: "month",
                format:'yyyy-mm-dd',
                initialDate: new Date(),
                autoclose: true,
                todayBtn: true,
            });
            //setDateRange('dm');
            $(".time-range").bind('click',function () {
                setDateRange($(this).data('type'));
            })
        })

    </script>
    <script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script>

    <script id="upload-tpl" type="text/html">
        <li>
            <img src="<?php echo IMG_HTTP_PATH;?>{{name}}" class="img-thumbnail" width="160px" height="90px" />
            <input type="hidden" name="path[]" value={{name}} />
            <button type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        </li>
    </script>
    <style>
        <!--
        .shouqi_s{overflow: hidden;}
        .gengduo_s{overflow: visible;}
        -->
    </style>
    <script type="text/javascript">
        $(function () {
            $('.chosen-container').css('width',"100%");
            var c_client = new OSS.Wrapper({
                region: 'oss-cn-shanghai',
                accessKeyId: 'LTAIqUbOPUz16zaX',
                accessKeySecret: 'FzQDTPRfbKRrJ3U9d6psiIa36iJ3lF',
                bucket: 'nuanguang-img'
            });
            $('#upload_img').bind('change', function (e) {
                var file = e.target.files[0];
                console.log(file);
                var ext=/.[^.]+$/.exec(file.name);
                var storeAs = 'img_lib/a'+new Date()*1 + parseInt(Math.random()*100)+ext;
                c_client.multipartUpload(storeAs, file).then(function (result) {
                    var html = template('upload-tpl', {src:result.url,name:storeAs});
                    $("#upload_list").append(html);
                }).catch(function (err) {
                    console.log(err);
                });
            });

        })
        $(document).on("click",".gengduo",function() {
            $(this).text('收起更多');
            $(this).addClass('shouqi');
            $(this).removeClass('gengduo');
            $('.sousuo').height(212);
            $('.sousuo').addClass('gengduo_s');
            $('.sousuo').removeClass('shouqi_s');
        })
        $(document).on("click",".shouqi",function() {
            $(this).text('展开更多');
            $(this).addClass('gengduo');
            $(this).removeClass('shouqi');
            $('.sousuo').height(88);
            $('.sousuo').addClass('shouqi_s');
            $('.sousuo').removeClass('gengduo_s');
        })

            function for_tag() {
                var i=1;
                $("td.tag_list_js").each(function () {
                    i++;
                    var td_id = $(this).attr('id');
                    var data_ids = $(this).attr('data-ids');
                    setTimeout(function () {
                        tag_list_echo(td_id, data_ids);
                    }, 500*i-300);
                });
        }
        function for_topic() {
                var i=1;
                $("td.topic_list_js").each(function () {
                    i++;
                    var td_id = $(this).attr('id');
                    var data_ids = $(this).attr('data-ids');
                    setTimeout(function () {
                        top_list_echo(td_id, data_ids);
                    }, 500*i-300);
                });
        }
            for_tag();
            for_topic();
        $(function () {

            $('.update_title').blur(function () {
                var id=$(this).attr('data-id');
                var data_title=$(this).attr('data-title');
                var title=$(this).val();
                var t=$(this);
                if(data_title == title){
                    return false;
                }
                $.ajax({
                    type:'post',
                    url:"index.php?c=post&m=up_title",
                    data:{'id':id,'title':title},
                    dataType:'json',
                    success:function(result){
                        if(result['status'] == 1){
                            // status.css({'color':'red'});
                            // console.log(t);
                            t.attr('data-title',title)
                            $("#desc_"+id+"").attr('rows',1);
                            add_scrolltop("desc_"+id+"",1)
                        }else{
                            alert(result['msg'])
                        }
                    }
                });
            });
        })

    </script>
<?php  include VIEWPATH.'common/footer.php';  ?>